<div id="haut-contenu"> </div>
<div id="interne">
	<?php use_helper('I18N', 'Date') ?>
	<h2> <?php echo $domain->getNameDom()?> </h2>
	<div>Liste des sujets reli&eacute;s</div>
	
	<?php if(count($domain->Subjects) > 0):?>
	<div id="sf_admin_content">
    <form action="<?php echo url_for('@subject', array('action' => 'batch')) ?>" method="post">
	 <table>
	  <tbody>
	    
	    <tr>
	      <th>Num</th>
	      <th>Titre</th>
	      <th>lu (fois)</th>
	      <th>Dernière date de modification</th>
	    </tr>
	    <?php foreach ($domain->Subjects as $subject):?>
	    <tr>
	      <td><a href="<?php echo url_for('subject/show?id='.$subject->getId()) ?>"><?php echo $subject->getId()?></a></td>
	      <td><?php echo $subject->getTitleSjt() ?></td>
	      <td><?php echo $subject->getReadTimes() ?></td>
	      <td><?php echo format_date($subject->getUpdatedAt(), "d/M/y") ?></td>
	      <td>
	      	<ul class="sf_admin_td_actions">
		      <?php echo link_to('Éditer', 'subject/edit?id='.$subject->getId()) ?>
		      <?php echo link_to('Supprimer',  'subject/edit?id='.$subject->getId()) ?>
		    </ul>
	      </td>
	    </tr>
	    <?php endforeach;?>
	  </tbody>
	</table>
  </form>
</div>	
</div>

<?php else :?>
<div>
	Aucun sujet lié
</div>
<?php endif;?>
<div id="bas-contenu"> </div>

<hr />

<a href="<?php echo url_for('domain/edit?id='.$domain->getId()) ?>">&Eacute;diter</a>
&nbsp;
<a href="<?php echo url_for('domain/index') ?>">Retour vers la liste</a>
&nbsp;
<a href="<?php echo url_for('subject/new?domain='.$domain->getId()) ?>">Nouveau sujet</a>
